Conversation
Part of python#14741
|
Remaining errors are handling in other PRs. |
This comment has been minimized.
This comment has been minimized.
stdlib/errno.pyi
Outdated
| ESHLIBVERS: Final[int] | ||
| if sys.version_info >= (3, 11): | ||
| EQFULL: Final[int] | ||
| if sys.version_info >= (3, 14): |
There was a problem hiding this comment.
Apparently this was added as early as 3.11.1: https://github.com/python/cpython/pull/96038/files
Not sure why it started showing up in stubtest now.
There was a problem hiding this comment.
I had seen that, but dismissed it. I will add it and just add it to the stubtest exclude lists for now (if there is an error).
There was a problem hiding this comment.
It fails only on MacOS. I found no indication online that the errno exists on MacOS, but shrug. Agree it's best to claim it's present and allowlist the errors on 3.11-3.13.
There was a problem hiding this comment.
The documentation says it's a WASI errno. For some reason it also says that it's supported on FreeBSD. But since both are not supported platforms for typing purposes, maybe it's best to just remove the errno for now (with a stubtest allowlist) entry? Or add it unconditionally, not just on MacOS?
There was a problem hiding this comment.
Evidently it's at least sometimes present on macOS 9in the GitHub runner). I don't feel too strongly but in general I'd err on the side of over-including this kind of constant; people who use them will generally know to use hasattr()-type checks and it's a better experience if they're incorrectly present in the stub than if they're missing.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Part of #14741